package com.kaibes.platform.file.client.db;

import java.math.BigInteger;
import java.time.LocalDateTime;

import com.kaibes.core.base.annotation.Description;

import lombok.Data;

/**
CREATE TABLE `file_map` (
  `id` BIGINT NOT NULL AUTO_INCREMENT,
  `uuid` CHAR(32) NOT NULL,
  `server_id` integer NOT NULL,
  `name` VARCHAR(128) NOT NULL,
  `suffix` VARCHAR(8) NOT NULL,
  `type` VARCHAR(32) NOT NULL,
  `tag` VARCHAR(16) NOT NULL,
  `size` BIGINT DEFAULT NULL,
  `user_id` INTEGER DEFAULT NULL,
  `create_time` DATETIME NOT NULL DEFAULT NOW(),
  PRIMARY KEY (`id`),
  INDEX `idx_user_id` (`user_id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 */
@Data
@Description("文件映射")
public class FileMap {

    @Description("映射ID")
    private BigInteger id;
    @Description("服务器ID")
    private Integer serverId;
    @Description("文件UUID")
    private String uuid;
    @Description("文件名字")
    private String name;
    @Description("文件后缀")
    private String suffix;
    @Description("文件类型")
    private String type;
    @Description("标签")
    private String tag;
    @Description("文件大小")
    private long size;
    @Description("用户ID")
    private Integer userId;
    @Description("创建时间")
    private LocalDateTime createTime;
    
}
